package com.flyduck.system.vo.post.trans;


import cn.hutool.core.bean.BeanUtil;
import com.flyduck.system.entity.SysPostEntity;
import com.flyduck.system.vo.post.SysPostSelectRespVO;
import com.google.common.base.Function;


/**
 * @program: flyduck-platform
 * @description:
 * @author: flyduck
 * @create: 2021-02-01 12:42
 **/
public class SysPostEntityToSysPostSelectRespVO implements Function<SysPostEntity, SysPostSelectRespVO> {
    @Override
    public SysPostSelectRespVO apply(SysPostEntity sysPostEntity) {
        SysPostSelectRespVO sysPostSelectRespVO = new SysPostSelectRespVO();
        BeanUtil.copyProperties(sysPostEntity,sysPostSelectRespVO);
        sysPostSelectRespVO.setId(sysPostEntity.getId()+"");
        return sysPostSelectRespVO;
    }
}
